package com.smyh.bean.Enum;

import java.util.Vector;

/**
 * 遥设点位类型
 */
public enum PointSetType {

	A_HEV(1,"A相有电电压"),B_HEV(2,"B相有电电压"),C_HEV(3,"C相有电电压"),
	A_HEE(4,"A相有电电流(0.1A)"),	B_HEE(5,"B相有电电流(0.1A)"),C_HEE(6,"C相有电电流(0.1A)"),
	A_ISE(7,"A相注入小电流(0.1A)"),B_ISE(8,"B相注入小电流(0.1A)"),	C_ISE(9,"C相注入小电流(0.1A)"),
	A_IBE(10,"A相注入大电流(0.1A)"),B_IBE(11,"B相注入大电流(0.1A)"),C_IBE(12,"C相注入大电流(0.1A)"),
	A_EIT(13,"A相接地模式"),B_EIT(14,"B相接地模式"),C_EIT(15,"C相接地模式"),
	A_EPC(16,"A相接地脉冲检测个数"),B_EPC(17,"B相接地脉冲检测个数"),C_EPC(18,"C相接地脉冲检测个数"),
	A_SSV(19,"A相短路速断定值(0.1A)"),B_SSV(20,"B相短路速断定值(0.1A)"),C_SSV(21,"C相短路速断定值(0.1A)"),
	A_SOPV(22,"A相短路过流保护定值(0.1A)"),B_SOPV(23,"B相短路过流保护定值(0.1A)"),C_SOPV(24,"C相短路过流保护定值(0.1A)"),
	A_OPMinV(25,"A相过流保护时间下限(ms)"),B_OPMinV(26,"B相过流保护时间下限(ms)"),C_OPMinV(27,"C相过流保护时间下限(ms)"),
	A_OPMaxV(28,"A相过流保护时间上限(ms)"),B_OPMaxV(29,"B相过流保护时间上限(ms)"),C_OPMaxV(30,"C相过流保护时间上限(ms)"),
	A_FBPMT(31,"A相速断保护时间上限(ms)"),B_FBPMT(32,"B相速断保护时间上限(ms)"),C_FBPMT(33,"C相速断保护时间上限(ms)"),
	A_HET(34,"A相不停电时间(针对速断)(ms)"),B_HET(35,"B相不停电时间(针对速断)(ms)"),C_HET(36,"C相不停电时间(针对速断)(ms)"),
	A_SET(37,"A相停电时间(ms)"),B_SET(38,"B相停电时间(ms)"),C_SET(39,"C相停电时间(ms)"),
	A_RET(40,"A相复归时间(hour)"),B_RET(41,"B相复归时间(hour)"),C_RET(42,"C相复归时间(hour)"),
	A_MSIT(43,"A相遥测主动上传时间间隔(min)"),B_MSIT(44,"B相遥测主动上传时间间隔(min)"),C_MSIT(45,"C相遥测主动上传时间间隔(min)"),
	A_HERA(46,"A相有电复归使能"),B_HERA(47,"B相有电复归使能"),C_HERA(48,"C相有电复归使能"),
	A_HERT(49,"A相有电复归时间(s)"),B_HERT(50,"B相有电复归时间(s)"),C_HERT(51,"C相有电复归时间(s)"),
	A_MDSA(52,"A相遥测死区主动上传使能"),B_MDSA(53,"B相遥测死区主动上传使能"),C_MDSA(54,"C相遥测死区主动上传使能"),
	A_MDFV(55,"A相遥测死区定值(0.1A)"),B_MDFV(56,"B相遥测死区定值(0.1A)"),C_MDFV(57,"C相遥测死区定值(0.1A)"),
	A_TGA(58,"A相温度采集使能"),B_TGA(59,"B相温度采集使能"),C_TGA(60,"C相温度采集使能"),
	A_TCWV(61,"A相温度异常告警变化值(℃)"),B_TCWV(62,"B相温度异常告警变化值(℃)"),C_TCWV(63,"C相温度异常告警变化值(℃)"),
	A_BLW(64,"A相电池电量低告警使能"),B_BLW(65,"B相电池电量低告警使能"),C_BLW(66,"C相电池电量低告警使能"),
	A_BLWV(67,"A相电池电量低告警定值(mv)"),B_BLWV(68,"B相电池电量低告警定值(mv)"),C_BLWV(69,"C相电池电量低告警定值(mv)"),
	A_DEAV(70,"A相10ms防误动使能"),B_DEAV(71,"B相10ms防误动使能"),C_DEAV(72,"C相10ms防误动使能"),
	A_DMA(73,"A相DMA与全通道切换"),B_DMA(74,"B相DMA与全通道切换"),C_DMA(75,"C相DMA与全通道切换"),
	A_VCP(76,"A相电压变化百分比"),B_VCP(77,"B相电压变化百分比"),C_VCP(78,"C相电压变化百分比"),
	A_FEWRT(79,"A相故障电流录波自动恢复时间(0.5s)"),B_FEWRT(80,"B相故障电流录波自动恢复时间(0.5s)"),C_FEWRT(81,"C相故障电流录波自动恢复时间(0.5s)"),
	A_TA(82,"A相暂态法使能"),B_TA(83,"B相暂态法使能"),C_TA(84,"C相暂态法使能"),
	A_BY_1(85,"A相备用-1"),B_BY_1(86,"B相备用-1"),C_BY_1(87,"C相备用-1"),
	A_BY_2(88,"A相备用-2"),B_BY_2(89,"B相备用-2"),C_BY_3(90,"C相备用-2");
//	100	指示器组数
//	101	电池报警阀值（0.1V）
//	102	GSM模块关机电压(0.1V)
//	103	GSM模块开机电压(0.1V)
//	104	重连次数
//	105	最小重连间隔（S）
//	106	遥测上传周期(S)
//	107	心跳周期(S)
//	108	运行模式
//	109	备用1
//	110	备用2
//	111	备用3

	
	private String name;
	private int index;
	/**
	 * 构造方法
	 * @param index
	 * @param desc
	 */
	PointSetType(int index,String desc){
		this.setIndex(index);
		this.setName(desc);
	}
	/**
	 * 普通方法
	 */
    public static String getName(Integer index) {
    	if(index == null || index==0 ){
    		return "";
    	}
        for (PointSetType pointSetType : PointSetType.values()) {  
            if (pointSetType.getIndex() == index) {  
                return pointSetType.name;  
            }  
        }  
        return "";  
    }
    public static Integer getIndex(String name) {
		if("".equals(name)||name == null){
			return null;
		}
        for (PointSetType pointSetType : PointSetType.values()) {  
            if (pointSetType.getName().equals(name)) {  
                return pointSetType.index;  
            }  
        }  
        return null;  
    }
    private static Vector vectors = null;
    /**
     * 返回所有的index
     * @return
     */
    public static Vector<Object> getNames(){
    	if(vectors==null){
    		vectors = new Vector<Object>();
    		vectors.add("");
    		for (PointSetType pointSetType : PointSetType.values()) {
    			vectors.add(pointSetType.name);
    		}
    	}
    	return vectors;
    }
	public void setIndex(int index) {
		this.index = index;
	}
	public int getIndex() {
		return index;
	}
	public void setName(String name) {
		this.name = name;
	}
	public String getName() {
		return name;
	}
}
